<template>
  <div class="step1-container">
    <!-- 步骤信息 -->
    <div class="step">
      <div class="step-item item1">
        <img src="@/assets/pay/info.png" alt="" />
        <span>确认订单</span>
      </div>
      <div class="step-item item2">
        <div class="tail-top"></div>
        <div class="tail-bottom"></div>
        <span>选择支付方式</span>
      </div>
      <div class="step-item item3">
        <div class="tail-top"></div>
        <div class="tail-bottom"></div>
        <span>支付成功</span>
      </div>
    </div>
    <!-- 订单信息 -->
    <div class="shop-info">
      <span class="shop-info-title">订单信息</span>
      <div class="shop-info-container">
        <div class="shop-info-header">
          <div class="item nothing"></div>
          <div class="item shop-name">产品名称</div>
          <div class="item shop-package">套餐版本</div>
          <div class="item shop-time">套餐配额</div>
          <div class="item shop-price">价格</div>
        </div>
        <div class="shop-info-body">
          <div class="img-container item">
            <img :src="shopData.imgUrl" alt="" />
          </div>
          <div class="item shop-name">{{ shopData.name }}</div>
          <div class="item shop-package">{{ shopData.package }}</div>
          <div class="item shop-time">{{ shopData.time }}</div>
          <div class="item shop-price">￥{{ shopData.price }}</div>
        </div>
      </div>
    </div>
    <!-- 邮箱与备注 -->
    <div class="mail">
      <span class="mail-title">邮箱与备注</span>
      <div class="mail-container">
        <div class="addr">
          <div class="mail-desc-title">
            <span>*</span>
            邮箱地址:
          </div>
          <div class="mail-desc-body">
            <input type="text" />
            <div class="explain">邮箱用于接收订单信息和配置秘钥等信息</div>
          </div>
        </div>
        <div class="remark">
          <div class="mail-desc-title">备注：</div>
          <textarea
            maxlength="200"
            placeholder="填写订单备注,限200字"
          ></textarea>
        </div>
      </div>
    </div>
    <!-- 提交订单 -->
    <div class="submit-container">
      <div class="agree">
        <div class="agree-bt-container" @click="agree = !agree">
          <div class="agree-bt" v-if="agree">√</div>
        </div>
        <span
          >我已阅读并同意
          <span class="file">《名扬云市场服务协议》</span>
        </span>
      </div>
      <div class="payment">
        <span>实付款：</span>
        <span class="price">{{ shopData.price }}</span>
      </div>
      <router-link :to="{name:'Step2'}">
        <div class="goto"><span>提交订单并前往支付</span></div>
      </router-link>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      agree: false,
      shopData: {
        imgUrl: require("@/assets/detail/send.png"),
        name: "【短信服务】短信验证码",
        package: "83.3元/1000次",
        time: "1000次",
        price: "83.30",
      },
    };
  },
};
</script>

<style scoped lang="less">
@import "~@/styles/var.less";
.step1-container {
  padding: 0 360px 36px;
  .step {
    width: 100%;
    overflow: hidden;
    display: flex;
    .step-item {
      font-size: 14px;
      height: 32px;
      line-height: 32px;
      position: relative;
      text-align: center;
    }
    .item1 {
      width: 397px;
      background: @primary;
      color: #fff;
      &::after {
        content: "";
        position: absolute;
        display: block;
        width: 32px;
        height: 32px;
        background-color: @primary;
        right: -10px;
        top: 0px;
        transform: rotate(45deg);
      }
      img {
        width: 20px;
        height: 20px;
        vertical-align: -5px;
      }
    }
    .item2 {
      margin-left: 20px;
      width: 397px;
      background: #ededed;
      color: #666;
      &::after {
        content: "";
        position: absolute;
        display: block;
        width: 32px;
        height: 32px;
        background-color: #ededed;
        right: -10px;
        top: 0px;
        transform: rotate(45deg);
      }
      .tail-top {
        position: absolute;
        width: 38px;
        left: -20px;
        transform: rotate(45deg);
        top: -27px;
        height: 35px;
        background-color: #ededed;
      }
      .tail-bottom {
        position: absolute;
        width: 38px;
        left: -18px;
        transform: rotate(45deg);
        bottom: -27px;
        height: 35px;
        background-color: #ededed;
      }
    }
    .item3 {
      margin-left: 20px;
      width: 397px;
      background: #ededed;
      color: #666;
      .tail-top {
        position: absolute;
        width: 38px;
        left: -20px;
        transform: rotate(45deg);
        top: -27px;
        height: 35px;
        background-color: #ededed;
      }
      .tail-bottom {
        position: absolute;
        width: 38px;
        left: -18px;
        transform: rotate(45deg);
        bottom: -27px;
        height: 35px;
        background-color: #ededed;
      }
    }
  }
  .shop-info {
    display: flex;
    flex-direction: column;
    color: #333333;
    .shop-info-title {
      font-weight: bold;
      margin: 16px 0;
      font-size: 14px;
    }
    .shop-info-container {
      .shop-info-header {
        border-radius: 4px 4px 0px 0px;
        border: 1px solid #ededed;
        background: #f8f8f8;
        display: flex;
        .item {
          height: 48px;
          line-height: 48px;
          text-align: center;
          font-size: 14px;
          color: #666666;
        }
      }
      .shop-info-body {
        border-radius: 0px 0px 4px 4px;
        border: 1px solid #ededed;
        border-top: none;
        display: flex;
        .item {
          height: 96px;
          line-height: 96px;
          text-align: center;
        }
      }
    }
    .img-container {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 110px;
      img {
        width: 64px;
        height: 64px;
        border-radius: 4px;
      }
    }
    .nothing {
      width: 110px;
    }
    .shop-name {
      width: 388px;
    }
    .shop-package {
      width: 202px;
    }
    .shop-time {
      width: 239px;
    }
    .shop-price {
      width: 260px;
    }
  }
  .mail {
    display: flex;
    flex-direction: column;
    color: #333333;
    font-size: 14px;
    .mail-title {
      font-weight: bold;
      margin: 16px 0;
    }
    .mail-container {
      border-bottom: 1px solid #ededed;
      padding-bottom: 24px;

      .mail-desc-title {
        margin-right: 10px;
        span {
          color: #ff4242;
        }
      }
      .addr {
        padding: 12px 15px 12px 0;
        display: flex;
        align-items: center;
        justify-content: end;
        .mail-desc-body {
          display: flex;
          flex-direction: column;
          row-gap: 8px;
          .explain {
            color: #999999;
            font-size: 12px;
          }
        }
        input {
          width: 1050px;
          height: 36px;
          background: #ffffff;
          border-radius: 4px;
          outline: none;
          border: 1px solid #ededed;
          color: #999999;
        }
      }
      .remark {
        align-items: center;
        display: flex;
        justify-content: end;
        padding: 12px 15px 12px 35px;
        .mail-desc-title {
          margin-right: 5px;
        }
        textarea {
          width: 1050px;
          height: 80px;
          box-sizing: border-box;
          padding: 10px;
          outline: none;
          border: 1px solid #ededed;
          border-radius: 4px;
          resize: none;
        }
      }
    }
  }
  .submit-container {
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    .agree {
      display: flex;
      column-gap: 8px;
      .agree-bt-container {
        position: relative;
        width: 18px;
        height: 18px;
        border-radius: 2px;
        border: 1px solid #dddddd;
        cursor: pointer;
        .agree-bt {
          position: absolute;
          left: 3px;
          top: -1px;
          color: @primary;
        }
      }
      span {
        font-size: 14px;
        .file {
          color: @primary;
        }
      }
    }
    .payment {
      width: 100%;
      display: flex;
      column-gap: 3px;
      align-items: center;
      justify-content: flex-end;
      margin: 6px 0 16px;
      span {
        color: #333333;
        font-size: 14px;
      }
      .price {
        font-size: 20px;
        color: @primary;
      }
    }
    .goto {
      display: flex;
      justify-content: flex-end;
      span {
        background-color: @primary;
        width: 176px;
        height: 48px;
        line-height: 48px;
        text-align: center;
        border-radius: 6px;
        color: #fff;
      }
    }
  }
}
</style>